package com.xtedu.examproject.entity;

// src/com/example/model/StudentQuery.java

public class StudentQuery {
    private String idCard;
    private String name;
    private String phone;
    private String gender; // 用String类型便于处理空值
    private String classID;
    private String eduBackground;
    private int page = 1;
    private int pageSize = 10;

    // 计算偏移量
    public int getOffset() {
        return (page - 1) * pageSize;
    }

    // getter和setter方法
    public String getIdCard() {
        return idCard;
    }

    public void setIdCard(String idCard) {
        this.idCard = idCard;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getGender() {
        return gender;
    }

    public void setGender(String gender) {
        this.gender = gender;
    }

    public String getClassID() {
        return classID;
    }

    public void setClassID(String classID) {
        this.classID = classID;
    }

    public String getEduBackground() {
        return eduBackground;
    }

    public void setEduBackground(String eduBackground) {
        this.eduBackground = eduBackground;
    }

    public int getPage() {
        return page;
    }

    public void setPage(int page) {
        this.page = page;
    }

    public int getPageSize() {
        return pageSize;
    }

    public void setPageSize(int pageSize) {
        this.pageSize = pageSize;
    }
}